package com.youwu.weather.service;

import com.youwu.weather.vo.City;
import com.youwu.weather.vo.WeatherResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

// 服务地址（即项目名）
@FeignClient("weather-eureka-client-zuul")
public interface DataClient {

    @GetMapping("/city/citys")
    List<City> listCity();

    @GetMapping("/data/weather/now/{city}")
    WeatherResponse getCurrentWeather(@PathVariable("city")String city);
    @GetMapping("/data/weather/now/{city}")
    WeatherResponse getHourlyWeather(@PathVariable("city")String city);
    @GetMapping("/data/weather/now/{city}")
    WeatherResponse getForecastWeather(@PathVariable("city")String city);
    @GetMapping("/data/weather/now/{city}")
    WeatherResponse getLifestyleWeather(@PathVariable("city")String city);
}
